<?php
namespace app\scodetrace\controller;

class Prizes extends \app\common\controller\Base {
	protected $modelname='Prize';
	use \app\common\controller\BaseLog;

	protected function _index(){
		$condition=[];
		$param=$this->param;

    if (isset($param['activity_name']))
      $condition[]=['activity_id','in',model('Activity')->where('name','like','%'.$param['activity_name'].'%')->column("id")];

    if (isset($param['group'])) {
      $condition[]=['group_id','in',model('baseinfo/Group')->where('name','like','%'.$param['group'].'%')->column('id')];
    }

		return $condition;
	}
}

?>